﻿using System;
using System.Data.Entity;
using Domain;
using Supermodel.Repository;
using Supermodel.UOW;

namespace CmdUI
{
    class Program
    {
        static void Main(string[] args)
        {
            //EFCF
            Database.SetInitializer(new DropCreateDatabaseIfModelChanges<MyUnitOfWork>());

            using (new MyUnitOfWork())
            {
                //var user = new User() { FirstName = "Barak", LastName = "Obama", Active = true };
                //user.Add();

                var user = RepoFactory.Create<User>().GetById(1);
                user.Disable();
            }

            Console.WriteLine("Press a key");
            Console.ReadKey();
        }
    }
}
